﻿using Entity;
using System.Collections.Generic;
using Utils;

namespace DataBaseConnect.App
{
    public interface IMenuAppService
    {
        /// <summary>
        /// 获取菜单（分页）
        /// </summary>
        /// <param name="MenuName">菜单名</param>
        /// <param name="page">当前页码</param>
        /// <param name="limit">每页显示多少条</param>
        /// <param name="rowCount">总条数</param>
        /// <returns></returns>
        List<Menu> GetMenuListPage(string MenuName, int page, int limit, out int rowCount);

        /// <summary>
        ///  添加菜单信息
        /// </summary>
        /// <param name="input">菜单信息实体</param>
        /// <returns></returns>
        ReceiveStatus AddMenuMsg(Menu input);

        /// <summary>
        ///  编辑菜单信息
        /// </summary>
        /// <param name="input">菜单信息实体</param>
        /// <returns></returns>
        ReceiveStatus EditMenuMsg(Menu input);

        /// <summary>
        /// 递归删除菜单
        /// 删除菜单权限
        /// 删除菜单按钮权限
        /// 删除菜单按钮
        /// </summary>
        /// <param name="MenuId">菜单主键</param>
        /// <returns></returns>
        ReceiveStatus DelMenu(int MenuId);

        /// <summary>
        /// 根据主键获取菜单信息
        /// </summary>
        /// <param name="MenuId">主键</param>
        /// <returns></returns>
        Menu GetMenuFirst(int MenuId);

        /// <summary>
        /// 获取所有菜单
        /// </summary>
        /// <returns></returns>
        List<Menu> GetAllMenuList();

        /// <summary>
        /// 根据角色id获得菜单权限
        /// </summary>
        /// <param name="RoleId">角色id</param>
        /// <returns></returns>
        List<MenuRole> GetRoleIdList(int RoleId);
    }
}
